<script>
import { ref, reactive, isReactive } from 'vue'
export default {
  name: 'App',
  setup() {
    // ref 和 reactive 响应式原理
    // !#1 ref 响应式原理：Object.defineProperty
    // !#2 ref 如果里面有对象：借助了 reactive，其实就是 Proxy
    // !#3 reactive 响应式原理：Proxy
    /* const num = ref(8)
    console.log(num) */

    /* reactive({
      value: {
        name: 'ifer',
        age: 18,
      },
    }) */
    /* const person = ref({
      name: 'ifer',
      age: 18,
    })
    console.log(isReactive(person.value)) */

    const person = reactive({
      name: 'ifer',
    })
    console.log(person)
  },
}
</script>
